home *** CD-ROM | disk | FTP | other *** search
- (*----------------------------------------------------------------------*)
- (* Capture_Char -- write character to capture file *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Capture_Char( Ch : CHAR );
-
- (*----------------------------------------------------------------------*)
- (* *)
- (* Procedure: Capture_Char *)
- (* *)
- (* Purpose: Writes character to capture file *)
- (* *)
- (* Calling Sequence: *)
- (* *)
- (* Capture_Char( Ch : CHAR ); *)
- (* *)
- (* Ch --- the character to be written out *)
- (* *)
- (* Remarks: *)
- (* *)
- (* If Exact_Capture is TRUE, then characters are written just *)
- (* as they are received. If Exact_Capture is FALSE, then *)
- (* a full screen image line is gathered up and written when *)
- (* an LF or FF is encountered. *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- VAR
- Screen_Line : STRING[80];
- IY : INTEGER;
-
- BEGIN (* Capture_Char *)
-
- IF Exact_Capture THEN
- IF ( Ch = CHR( LF ) ) THEN
- WRITELN( Capture_File )
- ELSE
- WRITE( Capture_File , Ch )
- ELSE
- IF ( Ch = CHR( LF ) ) THEN
- BEGIN
- IY := WhereY;
- Get_Screen_Text_Line( Screen_Line , IY, 1 );
- Screen_Line := Trim( Screen_Line );
- WRITELN( Capture_File , Screen_Line );
- END
- ELSE IF ( Ch = CHR( FF ) ) THEN
- BEGIN
- IY := WhereY;
- Get_Screen_Text_Line( Screen_Line , IY, 1 );
- Screen_Line := Trim( Screen_Line );
- WRITELN( Capture_File , Screen_Line );
- WRITELN( Ch );
- END;
-
- END (* Capture_Char *);